package com.Ngbussiness.dao.impl;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

import net.sf.json.JSONArray;
import net.sf.json.JSONObject;

import com.Ngbussiness.dao.platform_activityDao;
import com.Ngbussiness.util.DatabaseAccess;
import com.Ngbussiness.util.EasyMapsManager;


public class platform_activityDaoImpl implements platform_activityDao{
	public List queryGetSidebar(String category_id){
		String sql = "select p.title,p.content from platform_activity p where p.category_id=? order by `order` asc;";
		try{
			DatabaseAccess databaseAccess = new DatabaseAccess(false);
			EasyMapsManager easyMapsManager = new EasyMapsManager(databaseAccess);
			easyMapsManager.setPreparedParameter(category_id);
			List list = easyMapsManager.executeQuery(sql);
			System.out.println(list.size());
			databaseAccess.close();
			return list;
		}catch(Exception e) {
			e.printStackTrace();
		}
		return null;
	}
}
